package com.roshan.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.roshan.domain.BaseDomain;

@SuppressWarnings( {"unchecked"})
public interface BaseDAO<T extends BaseDomain, S extends Serializable> {

    T save(T entity);

    void update(T entity);

    void delete(T entity);

    boolean exists(S id);

    void delete(S id);

    T findById(S id);

    void flush();

    List<T> findAll();

    List<T> findAllDistinct();

    List<T> findByNamedQuery(String queryName, Map<String, Object> queryParams);

}
